#include "Plugin.h"
#include "flacDecode.h"

flacDecode * flacdecoder;

void Init(){
    flacdecoder = new flacDecode;
}

void Destroy(){
    delete flacdecoder;
}

bool Checking( void * pData, unsigned long long length){
  
    return flacdecoder->check( pData, length );
    
}

bool Decoding( void * pTarget, size_t length, size_t * ReadSize ){
    return flacdecoder->Decoding( pTarget, length, ReadSize );
}

void getStatus( unsigned * pFormat, unsigned * pChannels, unsigned * pRate ){
    flacdecoder->getStatus( pFormat, pChannels, pRate );
}

bool SetTrack( int Min, int Second, int Frame, int EndMin, int EndSecond, int EndFrame ){
    return flacdecoder->SetTrack( Min, Second, Frame, EndMin, EndSecond, EndFrame );
}

bool Seek( int Min, int Second, int Frame ){
    return flacdecoder->Seek( Min, Second, Frame );
}

void getTotalTime( int * pMin, int * pSecond, int * pFrame ){
    flacdecoder->getTotalTime( pMin, pSecond, pFrame );
}

const char * prefixSurport(){
    return "flac";
}
